package com.frozenc.mapper;

import com.frozenc.domain.Category;
import com.frozenc.domain.News;
import com.frozenc.domain.Page;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.dao.DataAccessException;

import java.util.List;

/**
 * Created by FrozenC on 2016/9/11.
 */
@Mapper
public interface NewsMapper {

    List<News> selectLastNews(Integer num);

    List<News> selectLastNewsByCategoryId(Integer num,Integer category_id);

    int insertNews(News news) throws DataAccessException;

    int updateNews(News news) throws DataAccessException;

    News selectNewsById(Integer id);
}
